import { ElLoading } from "element-plus"
import "element-plus/theme-chalk/el-loading.css"

let loading: { close: () => void }
function openLoading() {
  loading = ElLoading.service({
    // body: true,
    lock: true,
    // spinner: "el-icon-loading",
    // background: "rgba(0, 0, 0, 0.1)",
    text: "加载中。。。",
    customClass: "osloading" // 重点，修改样式类名
  })
}
function closeLoading() {
  loading.close()
}
export { openLoading, closeLoading }
